<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8">
    <title>用户信息</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <!-- page specific plugin styles -->
    <script src="__PUBLIC__/admin/js/jquery.min.js"></script>
    <script src="__PUBLIC__/admin/laydate/laydate.js"></script>
    <script src="__PUBLIC__/admin/js/lodash.min.js"></script>
    <script src="__PUBLIC__/admin/js/moment.min.js"></script>
    <script src="__PUBLIC__/admin/js/zh-cn.js"></script>
    <script src="__PUBLIC__/admin/js/numeral.min.js"></script>
    <script src="__PUBLIC__/admin/js/toastr.min.js"></script>
    <script src="__PUBLIC__/admin/js/cookies.js"></script>
    <script src="__PUBLIC__/admin/js/knockout-min.js"></script>
    <script src="__PUBLIC__/admin/js/knockout.mapping.min.js"></script>
    <script src="__PUBLIC__/admin/js/bootstrap-datetimepicker.min.js"></script>
    <script src="__PUBLIC__/admin/js/jquery.validate.min.js"></script>
    <script src="__PUBLIC__/admin/js/jquery.validate.unobtrusive.min.js"></script>
    <script src="__PUBLIC__/admin/js/clipboard.min.js"></script>
    <script src="__PUBLIC__/admin/js/select2.min.js"></script>
    <script src="__PUBLIC__/admin/js/admin.js"></script>
    <script>moment.locale('zh-cn');
      toastr.options.positionClass = 'toast-bottom-right';</script>
    <!-- inline styles related to this page -->
    <!-- ace settings handler -->
    <script src="__PUBLIC__/admin/js/ace-extra.min.js"></script>
    <link media="all" href="__PUBLIC__/admin/css/index14.css" type="text/css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/css/glyphicons-halflings-regular.css"></head>
  
  <body class="no-skin">
    <!-- #section:basics/navbar.layout -->
    <include file="./Public/gong/title.html" />
    <div class="main-container" id="main-container">
      <script type="text/javascript">try {
          ace.settings.check('main-container', 'fixed')
        } catch(e) {}</script>
      <div id="sidebar" class="sidebar responsive">
        <script type="text/javascript">try {
            ace.settings.check('sidebar', 'fixed')
          } catch(e) {}</script>
        <include file="./Public/gong/list.html" />
        <div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
          <i class="ace-icon fa fa-angle-double-left" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
        </div>
        <script type="text/javascript">try {
            ace.settings.check('sidebar', 'collapsed')
          } catch(e) {}</script>
      </div>
      <!-- /section:basics/sidebar -->
      <div class="main-content">
        <div class="breadcrumbs" id="breadcrumbs">
          <script type="text/javascript">try {
              ace.settings.check('breadcrumbs', 'fixed')
            } catch(e) {}</script>
          <ul class="breadcrumb">
            <li>
              <i class="ace-icon fa fa-home home-icon"></i>
              <a href="#">Home</a></li>
            <li class="active">用户信息</li></ul>
          <!-- /.breadcrumb -->
          <!-- /section:basics/content.searchbox --></div>
        <!-- /section:basics/content.breadcrumbs -->
        <div class="page-content">
          <div class="page-content-area">
            <div class="row">
              <div class="col-xs-12">
                <!-- PAGE CONTENT BEGINS -->
                <!--/span-->
                <!-- left menu ends -->
                <div style="margin-bottom: 10px;">
                    <ul class="nav nav-tabs">
                        <li class="active"><a    href="__URL__/userdetails.html?id={$_GET.id}">用户信息</a></li>
                        <li class=""><a    href="__URL__/userlogin_list.html?id={$_GET.id}">登录日志</a></li>
                        <li class=""><a    href="__URL__/lhistory.html?id={$_GET.id}">浏览记录</a></li>
                        <li class=""><a    href="__URL__/gold_log.html?id={$_GET.id}">金币记录</a></li>
                        <li class=""><a    href="__URL__/chapter_buy.html?id={$_GET.id}">购买章节</a></li>
                        <li class=""><a    href="__URL__/chanrge.html?id={$_GET.id}">用户消费</a></li>
                    </ul>
                </div>
                <form id="main-form" class="form-horizontal" method="POST" action="__URL__/edit_user?id={$userd.id}" enctype="multipart/form-data">  
                  <div class="form-group">
                    <label class="control-label col-sm-3">昵称</label>
                    <div class="col-sm-9">
                      <input name="nickname" class="col-sm-5 col-xs-10" value="{$userd.nickname}" type="text">
                      <p class="help-block help-block-error col-sm-7 col-xs-10" data-valmsg-for="nickname" data-valmsg-replace="true"></p>
                    </div>
                  </div>
                <div class="form-group">
                    <label class="control-label col-sm-3">修改密码</label>
                    <div class="col-sm-9">
                        <input name="password" class="col-sm-5 col-xs-10" type="text">
                        <p class="help-block help-block-error col-sm-7 col-xs-10" data-valmsg-for="password" data-valmsg-replace="true"></p>
                    </div>
                </div>
                    <div class="form-group">
                        <label class="control-label col-sm-3">暗网开关</label>
                        <div class="col-sm-9">
                            <if condition="$userd['black_net'] heq '0'">
                                <label class="radio-inline">
                                    <input name="black_net" checked="checked" type="radio"  value="0" autocomplete="off">
                                    <span>关</span>
                                </label>&nbsp;&nbsp;&nbsp;&nbsp;
                                <label class="radio-inline">
                                    <input name="black_net"  type="radio"  value="1"  autocomplete="off">
                                    <span>开</span>
                                </label>
                                <else />
                                <label class="radio-inline">
                                    <input name="black_net"  type="radio"  value="0" autocomplete="off">
                                    <span>关</span>
                                </label>&nbsp;&nbsp;&nbsp;&nbsp;
                                <label class="radio-inline">
                                    <input name="black_net"  type="radio"  value="1" checked="checked" autocomplete="off">
                                    <span>开</span>
                                </label>
                            </if>
                        </div>
                    </div>
                  <div class="form-group">
                    <label class="control-label col-sm-3">金币</label>
                    <div class="col-sm-9">
                      <input name="gold" class="col-sm-5 col-xs-10" value="{$userd.gold}" type="text">
                      <p class="help-block help-block-error col-sm-7 col-xs-10" data-valmsg-for="gold" data-valmsg-replace="true"></p>
                    </div>
                  </div>
                  <div class="form-group">
                      <label class="control-label col-sm-3">用户身份</label>
                      <div class="col-sm-9">
                      <if condition="$userd['vip'] heq '0'">
                          <label class="radio-inline">
                              <input name="vip" checked="checked" type="radio"  value="1" autocomplete="off">
                              <span>游客</span>
                          </label>&nbsp;&nbsp;&nbsp;&nbsp;
                          <label class="radio-inline">
                              <input name="vip" type="radio"  value="1" autocomplete="off">
                              <span>普通用户</span>
                          </label>&nbsp;&nbsp;&nbsp;&nbsp;
                          <label class="radio-inline">
                              <input name="vip"  type="radio"  value="2"  autocomplete="off">
                              <span>VIP</span>
                          </label>
                      <elseif condition="$userd['vip'] heq '1'"/>
                          <label class="radio-inline">
                              <input name="vip" type="radio"  value="1" autocomplete="off">
                              <span>游客</span>
                          </label>&nbsp;&nbsp;&nbsp;&nbsp;
                          <label class="radio-inline">
                              <input name="vip" checked="checked" type="radio"  value="1" autocomplete="off">
                              <span>普通用户</span>
                          </label>&nbsp;&nbsp;&nbsp;&nbsp;
                          <label class="radio-inline">
                              <input name="vip"  type="radio"  value="2"  autocomplete="off">
                              <span>VIP</span>
                          </label>
                        <else/>
                          <label class="radio-inline">
                              <input name="vip" type="radio"  value="1" autocomplete="off">
                              <span>游客</span>
                          </label>&nbsp;&nbsp;&nbsp;&nbsp;
                          <label class="radio-inline">
                              <input name="vip" type="radio"  value="1" autocomplete="off">
                              <span>普通用户</span>
                          </label>&nbsp;&nbsp;&nbsp;&nbsp;
                          <label class="radio-inline">
                              <input name="vip" checked="checked"  type="radio"  value="2"  autocomplete="off">
                              <span>VIP</span>
                          </label>
                      </if>
                      </div>
                  </div>
                  <div class="form-group">
                    <label class="control-label col-sm-3">会员到期时间</label>
                    <div class="col-sm-9">
                      <input name="viptime" class="col-sm-5 col-xs-10" value="{$userd.viptime}" type="text" lay-key="1" id="viptime">
                      <p class="help-block help-block-error col-sm-7 col-xs-10" data-valmsg-for="viptime" data-valmsg-replace="true"></p>
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="control-label col-sm-3">注册手机号</label>
                    <div class="col-sm-9">
                      <input name="mobile" class="col-sm-5 col-xs-10" value="{$userd.mobile}" type="text">
                      <p class="help-block help-block-error col-sm-7 col-xs-10" data-valmsg-for="mobile" data-valmsg-replace="true"></p>
                    </div>
                  </div>
                    <div class="form-group">
                        <label class="control-label col-sm-3">拉黑状态</label>
                        <div class="col-sm-9">
                            <label class="radio-inline">
                                <input name="closed" type="radio"  value="0" <if condition="$userd.closed eq 0"> checked </if>>
                                <span>取消拉黑</span>
                            </label>
                            <label class="radio-inline">
                                <input name="closed" type="radio"  value="1" <if condition="$userd.closed eq 1"> checked </if>>
                                <span>拉黑</span>
                            </label>
                        </div>
                    </div>
                  <div class="clearfix form-actions">
                    <div class="col-md-offset-3 col-md-9">
                      <input type="hidden" name="id" value="{$book.id}" />
                      <button type="submit" class="btn btn-info" data-bind="click: submit, disable: submitting">保存</button></div>
                  </div>
                </form>
                <!-- <script>
                var viewModel = {
                raw_id: ko.observable(),
                username: ko.observable(),
                nickname: ko.observable(),
                token: ko.observable(),
                app_id: ko.observable(),
                app_secret: ko.observable(),
                submitting: ko.observable(false)
                };
                viewModel.submit = function () {
                if (viewModel.submitting()) {
                return false;
                }
                if (!$('#main-form').valid()) {
                return false;
                }
                viewModel.submitting(true);
                $.ajax({
                url: '/backend/settings/api_save_mp',
                type: 'POST',
                contentType: 'application/json',
                data: JSON.stringify(ko.mapping.toJS(viewModel))
                })
                .then(function () {
                toastr.success('保存成功');
                })
                .fail(handleAjaxError)
                .always(function () {
                viewModel.submitting(false);
                });
                };
                $(function () {
                ko.applyBindings(viewModel, document.getElementById('main-form'));
                $.get('/backend/settings/api_get_mp', function (data) {
                ko.mapping.fromJS(data, {}, viewModel);
                });
                })
                </script> -->
                <!-- PAGE CONTENT ENDS --></div>
              <!-- /.col --></div>
            <!-- /.row --></div>
          <!-- /.page-content-area --></div>
        <!-- /.page-content --></div>
      <!-- /.main-content --></div>
    <!-- /.main-container -->
    <!-- basic scripts -->
    <!-- <script type="text/javascript">
    if('ontouchstart' in document.documentElement) document.write("<script src='http://novel.818tu.com/static/assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
    </script> -->
    <script src="__PUBLIC__/admin/js/bootstrap.min.js"></script>
    <script src="__PUBLIC__/admin/js/jquery.webui-popover.min.js"></script>
    <script src="__PUBLIC__/admin/js/jquery.ui.widget.min.js"></script>
    <script src="__PUBLIC__/admin/js/jquery.fileupload.min.js"></script>
    <!-- page specific plugin scripts -->
    <!-- ace scripts -->
    <script src="__PUBLIC__/admin/js/ace-elements.min.js"></script>
    <script src="__PUBLIC__/admin/js/ace.min.js"></script>
    <!-- inline scripts related to this page -->
    <!-- the following scripts are used in demo only for onpage help and you don't need them -->
    <!-- <script type="text/javascript"> ace.vars['base'] = 'http://novel.818tu.com/static'; </script> -->
    <script src="__PUBLIC__/admin/js/elements.onpage-help.js"></script>
    <script src="__PUBLIC__/admin/js/ace.onpage-help.js"></script>
    <!-- 文本编辑器部分 -->
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.all.min.js"></script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript">//实例化编辑器
      //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
      laydate.render({

        elem: '#viptime' //指定元素
        
      });
      var ue = UE.getEditor('editor');

      function isFocus(e) {

        alert(UE.getEditor('editor').isFocus());

        UE.dom.domUtils.preventDefault(e)

      }

      function setblur(e) {

        UE.getEditor('editor').blur();

        UE.dom.domUtils.preventDefault(e)

      }

      function insertHtml() {

        var value = prompt('插入html代码', '');

        UE.getEditor('editor').execCommand('insertHtml', value)

      }

      function createEditor() {

        enableBtn();

        UE.getEditor('editor');

      }

      function getAllHtml() {

        alert(UE.getEditor('editor').getAllHtml())

      }

      function getContent() {

        var arr = [];

        arr.push("使用editor.getContent()方法可以获得编辑器的内容");

        arr.push("内容为：");

        arr.push(UE.getEditor('editor').getContent());

        alert(arr.join("\n"));

      }

      function getPlainTxt() {

        var arr = [];

        arr.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容");

        arr.push("内容为：");

        arr.push(UE.getEditor('editor').getPlainTxt());

        alert(arr.join('\n'))

      }

      function setContent(isAppendTo) {

        var arr = [];

        arr.push("使用editor.setContent('欢迎使用ueditor')方法可以设置编辑器的内容");

        UE.getEditor('editor').setContent('欢迎使用ueditor', isAppendTo);

        alert(arr.join("\n"));

      }

      function setDisabled() {

        UE.getEditor('editor').setDisabled('fullscreen');

        disableBtn("enable");

      }

      function setEnabled() {

        UE.getEditor('editor').setEnabled();

        enableBtn();

      }

      function getText() {

        //当你点击按钮时编辑区域已经失去了焦点，如果直接用getText将不会得到内容，所以要在选回来，然后取得内容
        var range = UE.getEditor('editor').selection.getRange();

        range.select();

        var txt = UE.getEditor('editor').selection.getText();

        alert(txt)

      }

      function getContentTxt() {

        var arr = [];

        arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容");

        arr.push("编辑器的纯文本内容为：");

        arr.push(UE.getEditor('editor').getContentTxt());

        alert(arr.join("\n"));

      }

      function hasContent() {

        var arr = [];

        arr.push("使用editor.hasContents()方法判断编辑器里是否有内容");

        arr.push("判断结果为：");

        arr.push(UE.getEditor('editor').hasContents());

        alert(arr.join("\n"));

      }

      function setFocus() {

        UE.getEditor('editor').focus();

      }

      function deleteEditor() {

        disableBtn();

        UE.getEditor('editor').destroy();

      }

      function disableBtn(str) {

        var div = document.getElementById('btns');

        var btns = UE.dom.domUtils.getElementsByTagName(div, "button");

        for (var i = 0,
        btn; btn = btns[i++];) {

          if (btn.id == str) {

            UE.dom.domUtils.removeAttributes(btn, ["disabled"]);

          } else {

            btn.setAttribute("disabled", "true");

          }

        }

      }

      function enableBtn() {

        var div = document.getElementById('btns');

        var btns = UE.dom.domUtils.getElementsByTagName(div, "button");

        for (var i = 0,
        btn; btn = btns[i++];) {

          UE.dom.domUtils.removeAttributes(btn, ["disabled"]);

        }

      }

      function getLocalData() {

        alert(UE.getEditor('editor').execCommand("getlocaldata"));

      }

      function clearLocalData() {

        UE.getEditor('editor').execCommand("clearlocaldata");

        alert("已清空草稿箱")

      }
      </script>
  </body>

</html>